﻿namespace KinonekoSoftware.Studio.ViewModels
{
    public abstract class RepositoryGalleryItem : TabViewModelSub
    {
        protected RepositoryGalleryItem()
        {
            Removable     = true;
            NewTabCommand = CreateCommand(DoNewTabCommand);
        }

        private void DoNewTabCommand()
        {
            //
            //
            IsNewTab = true;

            //
            //
            GoTo(this);
        }

        protected override void OnStop()
        {
            IsNewTab = false;
            base.OnStop();
        }

        public ICommandEX NewTabCommand { get; }
        public bool       IsNewTab      { get; private set; }
    }
}